#pragma once

#include <vector>
#include <string>

#include <QString>
#include <QPair>
#include <QSharedPointer>

#define TABLENAME "testTable"

struct BasicDetectionDefine2
{
	QString funcNo; // 业务ID  同共享

	int      id;
	QString  uid;       //guid
	QString  barcode;   //条码
	QString  message;   //消息
	QString  date_time;  //记录时间
	int      upload;
};
class DBControl
{
public:
	void createBcweldingDB();
	bool insertData(QSharedPointer<BasicDetectionDefine2> bcData);
	bool updateData(QSharedPointer<BasicDetectionDefine2> bcData);
	std::vector<QSharedPointer<BasicDetectionDefine2>> getData(bool isUpload, int num);

};


